Skip to content

fix: component tool schema description - #11909

Merged
sjrl merged 3 commits into
mainfrom
fix/component-tool-schema-description
Jul 9, 2026
Merged

fix: component tool schema description#11909
sjrl merged 3 commits into
mainfrom
fix/component-tool-schema-description

Conversation

@sjrl

@sjrl sjrl commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Related Issues

  • fixes #issue-number

Proposed Changes:

ComponentTool no longer adds a top-level description key to the generated parameters JSON schema. The wrapped component's docstring was emitted inside the parameters schema, where LLM providers (OpenAI, Anthropic, Google) do not use it, and for tools wrapping a SuperComponent it produced a confusing auto-generated summary. The parameters schema now only carries per-parameter descriptions, matching plain Tool and function-based tools. The tool-level description is unchanged.

How did you test it?

New tests

Notes for the reviewer

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@sjrl
sjrl requested a review from a team as a code owner July 8, 2026 10:19
@sjrl
sjrl requested review from davidsbatista and removed request for a team July 8, 2026 10:19
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
haystack-docs Ready Ready Preview, Comment Jul 9, 2026 12:13pm

Request Review

@sjrl sjrl self-assigned this Jul 8, 2026
@github-actions github-actions Bot added the type:documentation Improvements on the docs label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack/tools
  component_tool.py 372-373
  parameters_schema_utils.py 135
Project Total  

This report was generated by python-coverage-comment-action

@claude

claude Bot commented Jul 8, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@sjrl
sjrl changed the base branch from v3 to main July 8, 2026 13:20

@davidsbatista davidsbatista left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@sjrl

sjrl commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Hey @davidsbatista thanks for the comment! Could I also get an approval :)

@sjrl
sjrl enabled auto-merge (squash) July 9, 2026 12:27
@sjrl
sjrl merged commit 04435ad into main Jul 9, 2026
26 checks passed
@sjrl
sjrl deleted the fix/component-tool-schema-description branch July 9, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:tests type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants